<form id="pagerForm" method="post" action="<?php echo __URL__;?>">

    <input type="hidden" name="status" value="<?php echo $this->input->get_post('status'); ?>">
    <input type="hidden" name="keywords" value="<?php echo $this->input->get_post('keywords'); ?>" />

    <input type="hidden" name="pageNum" value="<?php echo $this->input->get_post('pageNum');?>" /><!--【必须】value=1可以写死-->
    <input type="hidden" name="numPerPage" value="<?php echo $this->input->get_post('numPerPage');?>" /><!--【可选】每页显示多少条-->
    <input type="hidden" name="orderField" value="<?php echo $this->input->get_post('orderField');?>" /><!--【可选】查询排序-->
    <input type="hidden" name="orderDirection" value="<?php echo $this->input->get_post('orderDirection');?>" /><!--【可选】升序降序-->
</form>


<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="<?php echo __URL__;?>" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        <?php
                        /*$options = $admin_node_group_tree;
                        echo form_dropdown("node_groupid", $options, $this->input->get_post("node_groupid")===false?'':$this->input->get_post("node_groupid"),"");*/
                        ?>
                        <select name="node_groupid">
                            <option value="">所有分组</option>
                            <?PHP echo $this->admin_node_group_model->get_admin_node_group_option_tree($this->input->get_post('node_groupid'));?>
                        </select>
                    </td>
                    <td>
                        搜索关键字：<input type="text" name="keywords" value="<?php echo $this->input->get_post('keywords');?>" />
                    </td>
                    <td>
                        <?php
                        $options = array(
                            ""  => "所有",
                            "0"   => "禁用",
                            "1"    => "可用",
                        );
                        echo form_dropdown("status", $options, $this->input->get_post("status")===false?'':$this->input->get_post("status"),"class=\"combox\"");
                        ?>                    </td>
                    <td>
                        创建日期：<input type="text" name="create_time" class="date" readonly="true" value="<?php echo $this->input->get_post('create_time'); ?>" />
                    </td>
                    <td>
                        更新日期：<input type="text" name="update_time" class="date" readonly="true" value="<?php echo $this->input->get_post('update_time'); ?>" />
                    </td>
                </tr>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                    <!--<li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>-->
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <!--<li><a class="add" href="<?php /*echo __URL__.'/add';*/?>" target="dialog" mask="true"><span>添加</span></a></li>-->
            <li><a class="delete" href="<?php echo __URL__.'/delete';?>/{id}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
            <li><a class="edit" href="<?php echo __URL__.'/edit';?>/{id}" target="dialog"><span>修改</span></a></li>
            <li class="line">line</li>
            <li><a class="icon" href="<?PHP echo __URL__.'/mk_admin_node';?>" target="navTab" title="读取未导入和已经废弃的节点?"><span>新节点/废弃节点管理</span></a></li>
            <!--<li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
            <li><a class="icon" href="demo/common/dwz-team.xls" target="dwzExport" targetType="navTab" title="实要导出这些记录吗?"><span>导出EXCEL</span></a></li>-->
        </ul>
    </div>

    <table class="list" width="100%" layoutH="115">
        <thead>
        <tr>
            <th width="80" class="<?php if('id'==$this->input->get_post('orderField')) echo $this->input->get_post('orderDirection'); ?>" orderfield="id">id</th>
            <th width="80" class="<?php if('title'==$this->input->get_post('orderField')) echo $this->input->get_post('orderDirection'); ?>" orderfield="title">节点名</th>
            <th width="80" class="<?php if('node_groupid'==$this->input->get_post('orderField'))echo $this->input->get_post('orderDirection'); ?>" orderfield="node_groupid">分组</th>
            <th width="80" class="">访问地址</th>
            <th width="80" class="<?php if('create_time'==$this->input->get_post('orderField'))echo $this->input->get_post('orderDirection'); ?>" orderfield="create_time">创建时间</th>
            <th width="80" class="<?php if('update_time'==$this->input->get_post('orderField'))echo $this->input->get_post('orderDirection'); ?>" orderfield="update_time">更新时间</th>
            <th width="80" class="<?php if('sort_order'==$this->input->get_post('orderField'))echo $this->input->get_post('orderDirection'); ?>" orderfield="sort_order">排序</th>
            <th width="80" class="<?php if('status'==$this->input->get_post('orderField'))echo $this->input->get_post('orderDirection'); ?>" orderfield="status">状态</th>
            <th width="80">操作</th>
        </tr>
        </thead>
        <tbody>
        <?php foreach($list as $v): ?><tr target="id" rel="<?php echo $v['id'] ?>">
            <td><?php echo $v['id']; ?></td>
            <td>
                <span feId="<?php echo $v['id']; ?>" target="feText" name="title" href="<?php echo __URL__ . '/setField/'; ?>"><?php echo empty($v['title']) ? 'NULL' : $v['title']; ?></span>
            </td>
            <td><?php echo $v['node_groupid']; ?></td>
            <td><a href="<?php echo site_url($v['modules'].'/'.$v['controller'].'/'.$v['method']); ?>" target="navTab" mask="true"><?php echo site_url($v['modules'].'/'.$v['controller'].'/'.$v['method']); ?></a></td>
            <td><?php echo $v['create_time']; ?></td>
            <td><?php echo $v['update_time']; ?></td>
            <td>
                <span feId="<?php echo $v['id']; ?>" target="feText" name="sort_order" href="<?php echo __URL__ . '/setField/'; ?>"><?php echo $v['sort_order']; ?></span>
            </td>
            <td><span feId="<?php echo $v['id']; ?>" target="feToggleState" name="status" href="<?php echo __URL__.'/setField/';?>"><?php echo empty($v['status'])?'0':$v['status']; ?></span></td>
            <td>
                <a class="btnDel" href="<?php echo __URL__.'/delete/'.$v['id']; ?>" target="ajaxTodo" title="删除">删除</a>
                <a class="btnEdit" href="<?php echo __URL__.'/edit/'.$v['id']; ?>" target="dialog" title="编辑">编辑</a>
            </td>
        </tr>
        <?php endforeach; ?>        </tbody>
    </table>

    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <?php
            $options = array("20"  => "20","50"=> "50","100"   => "100","200"   => "200",);
            echo form_dropdown("numPerPage", $options, $this->input->get_post("numPerPage"),"class=\"combox\" onchange=\"navTabPageBreak({numPerPage:this.value})\"");
            ?>            <span>条，共<?php echo intval($this->input->get_post("totalCount"));?>条</span>
        </div>

        <div class="pagination" targetType="navTab" totalCount="<?php echo intval($this->input->get_post("totalCount"));?>" numPerPage="<?php echo intval($this->input->get_post("numPerPage"));?>" pageNumShown="10" currentPage="<?php echo intval($this->input->get_post("pageNum")); ?>"></div>

    </div>
</div>